package com.kun.cmd.controller;

import com.kun.commonutil.result.Result;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author zhoukun
 * @Date 2021/4/4 13:09
 */
@RestController
public class UserTestController {

    @CrossOrigin
    //http://localhost:8001/vue-admin-template/user/login
    @PostMapping("/yygh/vue-admin-template/user/login")
    public Result<Map<String,String>> login()
    {
        Map<String,String> map=new HashMap<>();
        map.put("token","a4524542");
        return Result.ok(map);
    }
    @CrossOrigin
    @GetMapping("/yygh/vue-admin-template/user/info")
    public Result<Map<String,String>> info()
    {
        Map<String,String> map=new HashMap<>();
        map.put("roles","admin");
        map.put("name","admin");
        map.put("avatar","https://nimg.ws.126.net/?url=http%3A%2F%2Fcms-bucket.nosdn.127.net%2Fac2f69795f424bb7a74e75a99bce920c20171120112008.jpeg&thumbnail=660x2147483647&quality=80&type=jpg");
        return Result.ok(map);
    }


}
